package edu.fashion.service.product;

import java.util.List;
import edu.fashion.dao.product.SelectCategoryDaoLmpl;
import edu.fashion.dao.product.SelectPhotoDaoImpl;
import edu.fashion.model.Product;

/*
 * lxf
 */
public class SelectProductCategoryServiceImpl {
	SelectPhotoDaoImpl spd=new SelectPhotoDaoImpl();
	SelectCategoryDaoLmpl spad=new SelectCategoryDaoLmpl();
	public List<Product> selectCategoryProduct(String categoryName) {
		List<Product> products=null;
		products=spad.selectCategory(categoryName);
		for(int i=0;i<products.size();i++) {
			products.get(i).setProductPhoto(spd.selectPhoto(products.get(i).getProductId()));
		}
		return products;
	}
}
